From: Marco Trevisan (TreviƱo) Date: Sat, 13 Jul 2019 00:17:20 +0000 (+0200) Subject: screenshot: Return a Meta.Rectangle as geometry X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~528 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=22fe4e92c791d5ed19dad2e2a467f5a32af16167;p=gnome-shell.git screenshot: Return a Meta.Rectangle as geometry Since the geometry is used as a signal parameter, this can't be used when using a GObject based class, so use the Meta boxed type instead of a JS object. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559 --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 33233db90..bbc1be499 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -264,10 +264,12 @@ var SelectArea = class { } _getGeometry() { - return { x: Math.min(this._startX, this._lastX), - y: Math.min(this._startY, this._lastY), - width: Math.abs(this._startX - this._lastX) + 1, - height: Math.abs(this._startY - this._lastY) + 1 }; + return new Meta.Rectangle({ + x: Math.min(this._startX, this._lastX), + y: Math.min(this._startY, this._lastY), + width: Math.abs(this._startX - this._lastX) + 1, + height: Math.abs(this._startY - this._lastY) + 1 + }); } _onMotionEvent(actor, event) {